package taskApplication.model;

public class PeriodicTask extends Task{
	public static enum Period{daily, weekly, monthly, yearly}

	public PeriodicTask(String description, String due) {
		super(description, due);
	}
	
	public static String[] getAllPeriod()
	{
		String[] types = new String[PeriodicTask.Period.values().length];
		
		int count = 0 ;
		for(PeriodicTask.Period t : PeriodicTask.Period.values())
		{
			types[count++] = t.name();
		}
		return types ;
	}
	
	public Period getInterval()
	{
		return Period.valueOf(this.getDue());
	}
}
